package com.sm.dao.impl;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.sm.dao.interfaces.BookMapper;
import com.sm.entity.Book;
import com.sm.entity.BookExample;
@Repository("bookMapper1")
public class BookMapperImpl implements BookMapper {
	private static Log log = LogFactory.getLog(BookMapperImpl.class);
	private final static String namespace="com.sm.dao.interfaces.BookMapper";
	
	@Autowired
	private SqlSessionTemplate sst;

	@Override
	public long countByExample(BookExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByExample(BookExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insert(Book record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insertSelective(Book record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<Book> selectByExample(BookExample example) {
		log.debug("book SqlSessionTemplate 自己实现dao接口");
		return sst.selectList(namespace+".selectByExample", example);
	}

	public Book selectByPrimaryKey(Integer id) {
		log.debug("book SqlSessionTemplate 自己实现dao接口");
		return sst.selectOne(namespace+".selectByPrimaryKey", id);
	}

	@Override
	public int updateByExampleSelective(Book record, BookExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByExample(Book record, BookExample example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKeySelective(Book record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateByPrimaryKey(Book record) {
		// TODO Auto-generated method stub
		return 0;
	}

}
